home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / web / fweb / fweb-1.30 / manual / fwebmac.sty < prev    next >
Encoding:
Text File  |  1993-06-16  |  27.2 KB  |  1,054 lines

  1.  
  2. %  FTANGLE v1.30, created with UNIX on "Tuesday, May 11, 1993 at 10:55." 
  3. %  COMMAND LINE: "ftangle ./fwebmac -# -=fwebmac.sty"
  4. %  RUN TIME: "Thursday, June 10, 1993 at 12:38."
  5. %  WEB FILE:    "./fwebmac.web"
  6. %  CHANGE FILE: (none)
  7.  
  8. %% --- THIS IS fwebmac.sty ---
  9.  
  10. %% This file must be included into all .tex files produced by FWEAVE.  For
  11. %% the source for this file, please see fwebmac.web.
  12.  
  13. %% ---------------------------------------------------------------------------
  14.  
  15.  
  16. %% If it's not defined yet, load in the macros.
  17. \ifx\FWEBisloaded\relax\endinput\else\let\FWEBisloaded\relax\fi
  18.  
  19.  
  20. \def\FWEBversion{1.30}
  21. \def\FWEBdate{June 15, 1993}
  22.  
  23.  
  24. \def\LaTeX{{\rm L\kern-0.36em\raise0.3ex\hbox{\Csc a}\kern-0.15em T%
  25.     \kern-0.1667em \lower0.7ex\hbox{E}\kern-0.125em X}}
  26.  
  27.  
  28. \newif\ifLaTeXisloaded
  29.  
  30. \ifx\pageno\undefined
  31.     \LaTeXisloadedtrue
  32. \fi
  33.  
  34.  
  35. \ifx\selectfont\undefined\else
  36.     \fontsize{10}{12pt}\rm % The standard font for bulk of document.
  37. \fi
  38.  
  39.  
  40. \catcode`\@=11
  41.  
  42. \ifLaTeXisloaded
  43.     \let\pageno\c@page% \WEB\ has its own name for the page number.
  44.     \def\FWEBend{\let\clearpage\newpage% Otherwise, one gets a blank page.
  45.         \end{document}}% \LaTeX\ redefines |\end|.
  46. \else
  47.     \let\FWEBend\end
  48. \fi
  49.  
  50. \catcode`\@=12
  51.  
  52.  
  53. \long\def\comment#1\endcomment{}
  54.  
  55.  
  56. \def\WEB{\Wtypewriter{WEB}}
  57. \def\FWEB{\Wtypewriter{FWEB}}
  58. \def\CWEB{\Wtypewriter{CWEB}}
  59. \def\TANGLE{\Wtypewriter{TANGLE}} \let\Tangle\TANGLE
  60. \def\WEAVE{\Wtypewriter{WEAVE}}   \let\Weave\WEAVE
  61. \def\FTANGLE{\Wtypewriter{FTANGLE}}
  62. \def\FWEAVE{\Wtypewriter{FWEAVE}}
  63.  
  64.  
  65. \def\C{C}
  66. \def\Cpp{\C{\tt ++}}
  67. \def\FORTRAN{{\Csc Fortran}} \let\Fortran\FORTRAN
  68. \def\MAKE{{\tt MAKE}}       \let\Make\MAKE
  69. \def\RATFOR{{\Csc Ratfor}}   \let\Ratfor\RATFOR
  70. \let\TEX\TeX
  71. \def\UNIX{{\SC UNIX}}    \let\Unix\UNIX
  72.  
  73.  
  74. \chardef\other=12
  75.  
  76.  
  77. \let\amp\&
  78. \let\at\@
  79. \let\bslash\\
  80. \let\caret\^
  81. \let\dollar\$
  82. \let\dstar\*
  83. \let\equals\=
  84. \let\leftbrace\{
  85. \let\period\.
  86. \let\rightbrace\}
  87. \let\vertbar|
  88. \let\PM\#
  89. \let\PC\%
  90.  
  91.  
  92. \newdimen\pardimen
  93. \dimen0=\normalbaselineskip
  94. \parskip=\dimen0 plus 1pt
  95.  
  96. %% If you don't like spaces between paragraphs, change |\pardimen| to |0pt|.
  97. \pardimen=\parskip
  98.  
  99. \parskip 0pt% No stretch between paragraphs
  100.  
  101. %% Indentation for the \TeX\ part is handled in a separate variable
  102. %% |\TeXindent| from the variable |\notch| used for definition and code parts.
  103. \newdimen\TeXindent
  104. \TeXindent 1em% For paragraphs in the \TeX\ part.
  105.  
  106.  
  107. \ifx\selectfont\undefined
  108.     \let\mainfont\tenrm \let\cmntfont\tenrm
  109.     \font\eightrm=cmr8 \let\SC\eightrm
  110.  
  111.     \font\titlefont=cmssbx10 scaled \magstep2% Sans serif
  112.     \font\ttitlefont=cmtt10 scaled\magstep2% Typewriter type
  113.  
  114.     \font\tentex=cmtex10 % \TeX\ \.{extended char.\ set} (used in strings)
  115.     \font\Csc=cmcsc10 % Caps/small caps.
  116.     \font\tenbfit=cmbxti10 % \&{Intrinsic functions}
  117.  
  118. %% Used for module-number subscript:
  119.     \font\seventi=cmti7
  120.     \font\sevenrm=cmr7
  121.     \font\sevenbf=cmbx7
  122.  
  123. %% For special handling of array indices:
  124.     \font\sevenit=cmti7
  125.     \scriptfont\itfam=\sevenit
  126.  
  127.     \scriptscriptfont\itfam=\sevenit
  128.  
  129. \else % NFSS
  130.     \def\mainfont{\fontfamily{\rmdefault}\fontseries{m}\fontshape{n}%
  131.         \normalsize}
  132.     \let\cmntfont\mainfont
  133.  
  134.     \def\eightrm{\fontfamily{\rmdefault}\fontseries{m}\fontshape{n}%
  135.         \footnotesize}
  136.     \let\SC\eightrm
  137.  
  138.     \def\titlefont{\fontfamily{\sfdefault}\fontseries{\bfdefault}%
  139.         \fontshape{n}\Large}
  140.     \def\ttitlefont{\fontfamily{\ttdefault}\fontseries{m}\fontshape{n}%
  141.         \Large}
  142.  
  143.     \def\tentex{\fontfamily{\ttdefault}\fontseries{m}\fontshape{n}%
  144.         \normalsize}
  145.  
  146.     \def\Csc{\fontfamily{\rmdefault}\fontseries{m}\fontshape{\scdefault}%
  147.         \normalsize}
  148.     \def\tenbfit{\fontfamily{\rmdefault}\fontseries{\bfdefault}%
  149.         \fontshape{\itdefault}\normalsize}
  150.  
  151.     \def\seventi{\fontfamily{\rmdefault}\fontseries{m}%
  152.         \fontshape{\itdefault}\scriptsize}
  153.     \def\sevenrm{\fontfamily{\rmdefault}\fontseries{m}\fontshape{n}%
  154.         \scriptsize}
  155.     \def\sevenbf{\fontfamily{\rmdefault}\fontseries{\bfdefault}%
  156.         \fontshape{n}\scriptsize}
  157.  
  158.     \def\fiveti{\fontfamily{\rmdefault}\fontseries{m}%
  159.         \fontshape{\itdefault}\tiny}
  160.     \def\fiverm{\fontfamily{\rmdefault}\fontseries{m}\fontshape{n}\tiny}
  161.     \def\fivebf{\fontfamily{\rmdefault}\fontseries{\bfdefault}%
  162.         \fontshape{n}\tiny}
  163.  
  164.     \def\tensy{\fontfamily{cmsy}\fontseries{m}\fontshape{n}\normalsize}
  165.  
  166.     \def\pbf{\fontfamily{\rmdefault}\fontseries{\bfdefault}\fontshape{n}%
  167.         \selectfont}
  168.     \def\ptt{\fontfamily{\ttdefault}\fontseries{m}\fontshape{n}\selectfont}
  169. \fi
  170.  
  171. %% The next isn't really sufficient; this ought to be put into
  172. %% the definitions of |\tenpoint|, |\twelvepoint|, etc.
  173.     \let\bfit\tenbfit
  174.  
  175.  
  176.  
  177. \def\Wshort#1{\leavevmode\hbox{$#1$}}% One-letter identifiers such
  178.     % as~\Wshort{x} look better this way.
  179.  
  180. \def\Wid#1{\leavevmode\hbox{\it#1\/\kern.05em}}% Italic type for ordinary
  181.     % identifiers such as \Wid{test}.
  182.  
  183. %% By default, macros are formatted the same way as ordinary identifiers.
  184. %% However, you can change the following definitions to get special effects.
  185. %% Either make your own version of |fwebmac.sty| (use a change file with
  186. %% |fwebmac.web|), or redefine |\WidD| and/or |\WidM| with an \.{@l} command.
  187. \let\WidD\Wid % Outer macro
  188. \let\WidM\Wid % WEB macro
  189.  
  190. \def\Wreserved#1{\leavevmode\hbox{\def\\{\tt\BS}\bf#1\/}}% Boldface type
  191.     % for reserved words such as \&{integer}.
  192.  
  193. \def\Wintrinsic#1{\leavevmode\hbox{\def\\{\tt\BS}\bfit#1\/\kern.05em}}%
  194.     % Library/intrinsic function name such as \@{sin}.
  195.  
  196. %% In the following, we use |\gdef| instead of |\global\let| because we
  197. %% might want to change the definition of, e.g., |\WidM| with an \.{@l}
  198. %% command, which comes \It{after} the |\Wbegin| statement.
  199. \def\Wequate#1#2#3#4#5#6#7#8{%
  200.     \gdef#1{\Wreserved}% |\&| by default.
  201.     \gdef#2{\Wshort}% |\|| by default.
  202. %% Don't reorder the following three statements! In case arguments 3--5 are
  203. %% identical, we want the ordinary identifier to win.
  204.     \gdef#5{\WidM}% |\\| by default.
  205.     \gdef#4{\WidD}% |\\| by default.
  206.     \gdef#3{\Wid}% |\\| by default.
  207.     \gdef#6{\Wintrinsic}% |\@| by default.
  208.     \gdef#7{\Wkeyword}% |\.| by default.
  209.     \gdef#8{\Wtypewriter}}% |\.| by default.
  210.  
  211.  
  212. \def\Wzero{0}
  213.  
  214. \def\WIN#1#2{\ifmmode\def\ZZ{}\else\def\ZZ{\null$\null}\fi
  215.     \ZZ_{\def\next{#2}\ifx\next\Wzero{\bullet}\else\WINo{#1}{#2}\fi}\ZZ}
  216.  
  217.  
  218. %% Format the module-number subscript.
  219. \def\WINo#1#2{%
  220.     \ifcase#1\underline{\hbox{\sevenrm#2}}% Generic name (\.{@[}). [0]
  221.         \or\hbox{\sevenrm#2}% Function name. [1]
  222.         \or\underline{\hbox{\seventi#2}}% WEB macro. [2]
  223.         \or\hbox{\seventi#2}% Outer macro. [3]
  224.         \or\underline{\hbox{\sevenbf#2}}% \.{@`}. [4]
  225.         \or\hbox{\sevenbf#2}% \&{typedef}. [5]
  226.         \else{#2}% Error trap.
  227.     \fi}
  228.  
  229.  
  230. \def\Wtypewriter#1{\relax\ifmmode\gdef\YY{\null$\null}\else\gdef\YY{}\fi
  231.     \YY{\leavevmode\INITSTR#1}\YY}
  232.  
  233. \let\Wkeyword\Wtypewriter
  234.  
  235.  
  236. \def\INITSTR{%
  237.     \tentex % Typewriter type for strings
  238.     \let\\=\BS % Backslash in a string: '\.\\'.
  239.     \let\'=\RQ % Right quote in a string: '\.\''.
  240.     \let\`=\LQ % Left quote in a string: '\.\`'.
  241.     \let\{=\LB % Left brace in a string: '\.\LB'.
  242.     \let\}=\RB % Right brace in a string: '\.\RB'.
  243.     \let\~=\TL % Tilde in a string: '\.\~'.
  244.     \let\ =\SP % Space in a string: '\.\ '.
  245.     \let\_=\UL % Underline in a string: '\.\_'.
  246.     \let\&=\AM % Ampersand in a string: '\.\&'.
  247.     \def\0{\discretionary{\BS}{}{}}% FWEB inserts this automatically every
  248.       % so often so very long strings will break. Broken strings will
  249.       % be marked by a backslash.
  250.     \def\1{,\0}% FWEB replaces commas in strings by this, so strings
  251.         % tend to break after commas.
  252.     \let\2\space % Ordinary space after control sequences in \TeX.
  253.     \def\3{\space\space}% Translation of a tab in \TeX.
  254.     }
  255.  
  256.  
  257. \def\#{\hbox{\tt\char35}}% Parameter sign: '\#'.
  258. \def\${\hbox{\tt\char36}}% Dollar sign: '\$'.
  259. \def\%{\hbox{\tt\char37}}% Percent sign: '\%'.
  260. \def\^{\ifmmode\raise0.45ex\hbox{$\,\scriptstyle\mathchar"25E\,$}%
  261.     \else\char`^ \fi}% Pointer or
  262.     % hat: '\^'.
  263.     % Circumflex accents can be obtained from |\^^D| instead of |\^|.
  264. \def\AT!{@}% At sign for control text: '\AT!'
  265.  
  266.  
  267. \chardef\asterisk=`\*
  268. \def\ast{\ifmmode{\displaystyle\mathchar"2203}\else\asterisk\fi}
  269.  
  270.  
  271. \chardef\AM=`\&% Ampersand character in a string: '\.\&'.
  272. \chardef\BS=`\\% Backslash in a string: '\.\\'.
  273. \def\ttBS{{\tt\BS}}% Literal backslash: '\ttBS'.
  274. \chardef\LB=`\{% Left brace in a string: '\.\LB'.
  275. \def\LQ{{\tt\char'22}}% Left quote in a string: '\.\`'.
  276. \chardef\RB=`\}% Right brace in a string: '\.\RB'.
  277. \def\RQ{{\tt\char'23}}% Right quote in a string: '\.\''.
  278. \def\SP{{\tt\char`\ }}% (Visible) space in a string: '\.\ '.
  279. \chardef\TL=`\~% Tilde in a string: '\.\~'.
  280. \chardef\UL=`\_% Underline character in a string: '\.\_'.
  281.  
  282.  
  283.  
  284. \def\LA{\hbox{\LQ}}% Left quote outside a string
  285.  
  286.  
  287. \newbox\rulebox
  288. \newcount\ruleno
  289.  
  290. \def\rules#1{\leavevmode
  291.     \ruleno=0
  292.     \rlap{\vtop to 0pt{\null
  293.         \def\R{\setbox0=\hbox{\the\ruleno}%
  294.             \rlap{\vrule height0pt depth#1}%
  295.             \kern-0.5\wd0\copy0\kern-0.5\wd0
  296.             \advance\ruleno by1
  297.             \hskip1em}
  298.         \rlap{\R\R\R\R\R\R\R}
  299.         \vss}}}
  300.  
  301.  
  302. \newdimen\notch
  303. \notch 1em
  304.  
  305.  
  306. \newcount\globalindent
  307. \globalindent=3 % Global indentation in notches.
  308.  
  309.  
  310. \newcount\ind % Current indentation in notches.
  311. \newcount\lastind % Used for preprocessor commands.
  312. \def\saveind{\global\lastind=\ind}
  313.  
  314.  
  315. \newbox\bak  \setbox\bak=\hbox to -\notch{}% Backspace one notch.
  316. \newbox\bakk \setbox\bakk=\hbox to -2\notch{}% Backspace two notches.
  317.  
  318.  
  319. \def\1{\global\advance\ind by1\hangindent\ind\notch}% Indent one more notch
  320.  
  321.  
  322. \def\2{\global\advance\ind by-1{}}% Indent one less notch
  323.  
  324.  
  325. \def\3#1{\hfil\penalty#10\hfilneg}% Optional break within a statement.
  326.  
  327.  
  328. \def\4{\copy\bak}% Backspace one notch
  329.  
  330.  
  331. \def\5{\hfil\penalty-1\hfilneg \kern2.5\notch\copy\bakk
  332.     \yskipfalse\ignorespaces}
  333.  
  334.  
  335. \def\6{\ifmmode\else\par
  336.     \hangindent\ind\notch \noindent \kern\ind\notch \copy\bakk \ignorespaces\fi}
  337.  
  338.  
  339. \def\7{\WY\6}% Forced break and a little extra space.
  340.  
  341.  
  342. \def\8{\hskip-\ind\notch \hskip 2\notch}
  343.  
  344.  
  345. \newif\ifyskip
  346. \def\yskip{\medskip}
  347.  
  348.  
  349. \def\Hspace{\hbox{ }}
  350.  
  351.  
  352. \def\WPR#1{\copy\bakk \saveind%    |\global\advance\ind by 2|
  353.     \1\Wreserved{@#1}\Hspace}
  354.  
  355. \def\WPs{\global\ind=\lastind}
  356.  
  357.  
  358. \def\defin#1#2{\4\saveind
  359.     \1\Wreserved{#1}\hbox{$^{\rm#2}$}\Hspace}% Begin @d, @m, or @f.
  360.  
  361.  
  362. \def\note#1#2.{\WY\noindent{\hangindent2em\baselineskip10pt\eightrm#1 #2.\par}}
  363.  
  364. \def\lapstar{\rlap{*}}
  365.  
  366. %% If there's a current include file, it's printed at the start of each
  367. % section.
  368. \def\includefile{}
  369. \def\WIF#1{\def\includefile{#1}}
  370. \def\startsection{\WQ\noindent{\let\*=\lapstar\bf\modstar.%
  371. \ifx\includefile\empty\else\ [{\tt\includefile}]\fi\quad}}
  372.  
  373.  
  374. \def\skipbrace#1{\catcode`\{=1 }
  375.  
  376. \def\WC{\Wcmnt{\ast}{\finishcomment}}
  377. \def\Wc{\Wcmnt{/}{\XX}}
  378. \def\Wcmnt#1#2{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi% C-style cmnt
  379.     \XX\hfil\penalty-1\hfilneg
  380.     \ifyskip\else\quad\fi$/#1\,$%
  381.     \bgroup\cmntfont % The user can redefine the comment font |\cmntfont|.
  382.         \aftergroup#2%
  383.         \catcode`\{=\other\skipbrace}
  384.  
  385. \def\finishcomment{$\,\ast/$\XX}
  386.  
  387. \def\Wx#1{\kern-0.5\notch\hbox{\tt\%}}
  388.  
  389.  
  390. \def\WCDIR#1{\WPR!\Wtypewriter{#1}\WPs}
  391.  
  392.  
  393. \def\WCD#1{\ifmmode\hbox\fi{\ignorespaces#1}}
  394.  
  395.  
  396. \def\WD:#1:{\defin{@D}{#1}}% Outer macro definition: `\.{@D}'
  397. \def\Wd:#1:{\defin{@d}{#1}}% Outer macro definition: `\.{@d}'
  398. \def\WUd:#1:{\defin{@u}{#1}}% Undef outer macro: `\.{@u}'.
  399. \def\WMD{\defin{@M}{}}% WEB macro definition: `\.{@M}'.
  400. \def\WMd{\defin{@m}{}}% WEB macro definition: `\.{@m}'.
  401. \def\WE:#1:{\WPR{\##1}}% WEB preprocessor command: `\.{@\#if\dots}'.
  402.  
  403. \def\WF:#1:{\defin{@f}{#1}}% Format definition: `\.{@f}'.
  404.  
  405. \def\Wl:#1:{\defin{@l}{#1}}% Limbo text definition: `\.{@l}'.
  406. \def\Wv:#1:{\defin{@v}{#1}}% Operator overloading: `\.{@v}'.
  407. \def\WWW:#1:{\defin{@W}{#1}}% Identifier overloading:  `\.{@W}'.
  408. \def\Ww:#1:{\defin{@w}{#1}}% Identifier overloading:  `\.{@w}'.
  409.  
  410.  
  411. \outer\def\WM#1.{\MN#1.\Wmark\ifon\Wskip\startsection\ignorespaces}
  412.  
  413.  
  414. \newcount\Wss % Counter for the dots.
  415.  
  416. \newif\ifdotsafter % Do subsection dots come after or before the section name?
  417. \dotsafterfalse
  418.  
  419. \ifdotsafter % ``@* NAME...''
  420.     \def\Wbefore:#1.{\Wdefname#1.\Wdot}%
  421.     \def\Wafter{\WNss}%
  422. \else % ``@*.. NAME.'' or ``@*2 NAME.''
  423.     \def\Wbefore: #1{\def\next{\Wafter#1}% Case for neither dot nor number.
  424.         \ifx#1.\def\next{\Wdot.}% Count arbitrary dots.
  425.         \else\ifx#11\Wsectionnum1%
  426.         \else\ifx#12\Wsectionnum2%
  427.         \else\ifx#13\Wsectionnum3%
  428.         \else\ifx#14\Wsectionnum4% Highest numerical level allowed.
  429.         \fi\fi\fi\fi\fi
  430.         \next}%
  431.     \def\Wafter#1.{\Wdefname#1.\WNss}% Executed after figuring out level.
  432. \fi
  433.  
  434. \def\Wsectionnum#1{\Wss#1\let\next\Wafter}% Assign numerical section number.
  435. \def\Wdefname#1.{\def\Wname{#1}}% Remember name of section.
  436.  
  437. \outer\def\WN#1.{\MN#1.\Wss=0\Wbefore:}% Begin a starred section.
  438.  
  439.  
  440. \def\Wdot{\futurelet\next\WNs}
  441. \def\WNs{\ifx\next.\advance\Wss by 1\let\next\Wnext\else\let\next\Wafter\fi
  442.     \next}
  443. \def\Wnext#1{\Wdot}
  444.  
  445.  
  446. %% Page break for major sections.
  447. \def\Wsectionbreak{\ifcase\Wss\vfil\eject\fi}
  448.  
  449. %% Running headline.
  450. \def\rhead{\ifcase\Wss
  451.         \uppercase{\ignorespaces\Wname}%
  452.     \else
  453.         \ignorespaces\Wname%
  454.     \fi}% Define running headline.
  455.  
  456. \let\WZ\let % Now you can |\send| the control sequence |\WZ|
  457. \let\WIM\let % This macro is made temporarily unexpandable; see |\WZ|.
  458.  
  459. \def\WNss{%
  460.     \Wmark % Can't put this in |\MN| since |\rhead| must be defined first.
  461.     \Wsectionbreak % Typeset the break between sections.
  462.     \message{*\modno}% Progress report to the terminal.
  463.     \ifon
  464.         \ifcase\Wss\else\Wskip\fi
  465.         \startsection{\bf\ignorespaces\Wname.\quad}%
  466.         {\def\WIN{\WIM}%
  467.         \edef\next{\write\cont{\WZ{\the\Wss}{\Wname}%
  468.         {\modno}{\noexpand\the\pageno}}}\next}%
  469.             % To contents file |CONTENTS.tex|.
  470.         \ignorespaces}
  471.  
  472.  
  473. \def\WmarkN{\def\Wmark{{\def\WIN{\WIM}
  474.         \mark{\modno\noexpand\else\rhead}}}}
  475.  
  476. \ifx\selectfont\undefined
  477.     \WmarkN
  478. \else
  479.     \def\Wmark{{\def\WIN{\WIM}\let\protect\noexpand
  480.         \mark{\modno\noexpand\else\rhead}}}
  481. \fi
  482.  
  483. \def\Wmodno{\iftrue\topmark\fi}% Extracts the left-hand part of the mark.
  484.  
  485. \def\Whead{{\let\WIM\WIN
  486.     \expandafter\iffalse\topmark\fi}}% Extracts the right-hand part.
  487.  
  488.  
  489. \catcode`\@=11
  490.  
  491. \def\MN#1.{\par
  492.     \parskip=\pardimen % Reset to \TeX\ spacing
  493.     \parindent=\TeXindent
  494.     {\xdef\modstar{#1}\let\*=\empty\xdef\modno{#1}}
  495.     \ifLaTeXisloaded
  496.         \xdef\@currentlabel{\modno}%
  497.     \fi
  498.     \ifx\modno\modstar \onmaybe \else\ontrue \fi}
  499.  
  500. \catcode`\@=12
  501.  
  502.  
  503. \def\WDP#1{\ifx E#1\else{\tt#1}\fi}% Used in the exponent macro below.
  504.  
  505. \def\WO#1{%
  506.     {% Make the next definitions local.
  507.     \let\-\_%
  508.     \let\d\$%
  509.     \def\\{\let\_\-\let\$\d}%
  510.     \def\?{\kern.2em}%
  511.     \def\###1{\kern0.1em{\tt \ifcase##1F\or L\or U\or UL\else?\fi}}%C~constant.
  512.     \def\^##1{\cdot 10^{\aftergroup}\aftergroup\WDP\aftergroup##1}% Power of ten
  513.     \def\_{_{\\\rm\aftergroup}}% Fortran-90 kind parameter.
  514.     \def\%{{\rm H}\hbox{\aftergroup}\Wtypewriter{\aftergroup}}% Hollerith constant
  515.     \def\&{0{\tt b}}% Binary constant.
  516.     \def\~{\hbox{\rm\char'23\kern-.2em\it\aftergroup\?\aftergroup}}% Octal
  517.     \def\`{\hbox{\rm\char"7D\tt\aftergroup}}#1}}% Double quotes for hex constant
  518.  
  519.  
  520.  
  521. \def\WPr{\global\ind=\globalindent \1}
  522.  
  523.  
  524. \def\WP{\parskip=0pt \parindent=\notch
  525.     \rightskip=0pt plus 100pt minus 10pt
  526.     \sfcode`;=3000
  527.     \pretolerance 10000
  528.     \WPr
  529.     \leavevmode\kern\notch}
  530.  
  531.  
  532. \def\WQ{\rightskip=0pt
  533.     \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50 }
  534.  
  535.  
  536. \def\WA{\note{See also}}% Cross-reference for multiply defined section names.
  537.  
  538. \def\Wauto[#1]{\Wtypewriter{[#1]}\ }
  539.  
  540. \def\WB{\mathopen{\Wtypewriter{@/\ast}}}% Begin controlled comment.
  541.  
  542. \let\WG\ge % Greater than or equal sign: '$\WG$'.
  543.  
  544. \let\WI\neq % Unequal sign: '$\WI$'.  (Better reserve |\ne| for the
  545.         % electron density~$n_e$.)
  546.  
  547. \def\WJ{\Wtypewriter{@\&}}% TANGLE's join operation: '\WJ'.
  548.  
  549. \let\WK\gets % Left arrow: '$\WK$'.
  550.  
  551. \let\WL\le % Less than or equal sign: '$\WL$'.
  552.  
  553. \def\Wskip{\vfil\penalty-100\vfilneg \vskip12ptminus3pt}% See |\WM|, etc.
  554.  
  555. \def\Wskipped#1{\8\mathhexbox278.\quad\Wtypewriter{@I "#1"}\ \ {\it Section(s)
  556. skipped}\dots\WP}
  557.  
  558. \let\WPtr\Rightarrow % Fortran's stupid pointer assignment statement:
  559.         % '$\WPtr$'.
  560.  
  561. \let\WR=\lnot % Logical not: '$\WR$'.
  562.  
  563. \let\WS=\equiv % Equivalence sign: '$\WS$'.
  564.  
  565. \def\WT{\mathclose{\Wtypewriter{@\ast/}}}% Terminate controlled comment.
  566.  
  567. \def\WU{\note{This code is used in}}% Cross-reference for uses of sections.
  568.  
  569. \let\WV\lor % Logical or: '$\WV$'.
  570.  
  571. \let\WW=\land % Logical and: '$\WW$'.
  572.  
  573.  
  574. \def\WX#1:#2\X#3\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi
  575.     \XX$\langle\,$#2{\eightrm\kern.5em#1}$\,\rangle^{\rm #3}$\XX}
  576.  
  577.  
  578. \def\WY{\par\parskip=0pt\yskip}
  579.  
  580.  
  581. \def\?{\mathrel?}
  582.  
  583.  
  584. \def\Colon{\ifmmode\colon\else:\fi}
  585.  
  586. \def\CC{\mathord{::}}% '$x\CC y$'.
  587. \def\CF{{}\mathbin{::}{}}% '$x\CF y$'.
  588.  
  589.  
  590.  
  591. \def\=#1{\kern2pt\hbox{\vrule\vtop{\vbox{\hrule
  592.     \hbox{\strut\kern2pt\Wtypewriter{#1}\kern2pt}}
  593.     \hrule}\vrule}\kern2pt}
  594.  
  595. \let\Wequals\=
  596.  
  597.  
  598. \let\~=\ignorespaces
  599. \let\*=*
  600.  
  601.  
  602. \def\PQ{\mathrel{+\mathord\equiv}}% '$\PQ$'.
  603.  
  604.  
  605. \mathchardef\TLD="0218% '$\TLD$'.
  606.  
  607. \def\PP{\mathord{++}}% '$\PP$'.
  608. \def\MM{\mathord{--}}% '$\MM$'.
  609.  
  610. \def\MG{\mathord{\to}}% '$\MG$'.
  611.  
  612.  
  613. \def\LP{(}% Must be |\def|, not |\let|.
  614. \def\ISL#1#2]{\def\next{#1}}
  615. \def\EE#1{\ISL#1]\ifx\next\LP\EXP[#1]\else\EXP[(#1)]\fi}
  616. \def\EXP[(#1)]{^{#1}}
  617.  
  618.  
  619.  
  620. \let\SlSl\parallel% Concatenation: '$\SlSl$'.
  621.  
  622.  
  623. \def\LS{\mathopen{({/}}}
  624. \def\SR{\mathclose{{/})}}
  625.  
  626.  
  627. \def\NN{\hbox{\#\#}}% '\NN'.
  628. \def\NP{\hbox{\#!}}% '\NP'.
  629. \def\NC{\hbox{\#:}}% '\NC'.
  630. \def\ND{\hbox{\#.}}% '\ND'.
  631. \def\Nq{\hbox{\#\tt'}}% '\Nq'.
  632. \def\NQ{\hbox{\#\tt"}}% '\NQ'.
  633.  
  634.  
  635. \def\FALSE{{\cal F}}% '$\FALSE$'.
  636. \def\TRUE{{\cal T}}% '$\TRUE$'.
  637.  
  638.  
  639. \def\Wcp{\mathrel{+{=}}} \let\PE\Wcp % `$x\PE y$'.
  640. \def\Wcm{\mathrel{-{=}}} \let\ME\Wcm % `$x\ME y$'.
  641. \def\Wcs{\mathrel{\ast{=}}} \let\TE\Wcs % `$x\Wcs y$'.
  642. \def\Wcv{\mathrel{/{=}}} \let\FE\Wcv % `$x\FE y$'.
  643. \def\Wcd{\mathrel{\%{=}}} \let\CE\Wcd % `$x\Wcd y$'.
  644. \def\Wcx{\mathrel{\^\!{=}}}% `$x\Wcx y$'.
  645. \def\Wca{\mathrel{\amp{=}}}% `$x\Wca y$'.
  646. \def\Wco{\mathrel{\OR{=}}}% `$x\Wco y$'.
  647. \def\Wcg{\mathrel{\GG\!{=}}}% `$x\Wcg y$'.
  648. \def\Wcl{\mathrel{\LL\!{=}}}% `$x\Wcl y$'.
  649.  
  650. \def\EQV{\mathrel{?{=}}}% `$x\EQV y$'.
  651. \def\NEQV{\not\equiv}% `$x\NEQV y$'.
  652.  
  653.  
  654. \def\MOD{\mathrel{\%}}% `$x\MOD y$'.
  655. \def\OR{{\,|\,}}% `$x\OR y$'.
  656. \def\AND{{\,\amp\,}}% `$x\AND y$.
  657.  
  658. \def\GG{\mathrel{>\!>}}% `$x\GG y$'.
  659. \def\LL{\mathrel{<\!<}}% `$x\LL y$'.
  660.  
  661. \def\HE{\mathrel{\uparrow=}}% `$x\HE y$'.
  662.  
  663.  
  664. \let\openbraces=\{
  665. \let\closebraces=\}
  666. \def\{{\ifmmode\openbraces\else$\openbraces$\fi}
  667. \def\}{\ifmmode\closebraces\else$\closebraces$\fi}
  668.  
  669.  
  670. \def\WBM{\6\8\Wreserved{@(}}
  671. \def\WEM{\6\8\Wreserved{@)}}
  672.  
  673.  
  674. \def\Wblock#1{\Wc\bgroup\ Block #1\egroup}% `\Wblock{99}'
  675.  
  676.  
  677. \newif\ifop
  678. \newbox\dotbox
  679.  
  680. \def\Wunknown#1{\={??#1??}}% For unknown dot constant.
  681.  
  682. {\catcode`\_=11
  683.  
  684. \gdef\newop#1#2#3{%
  685.     \edef\next{\def\expandafter\noexpand\csname _#1_#2\endcsname}%
  686.     \next{#3}}
  687.  
  688. \gdef\newbinop#1#2#3{%
  689.     \edef\next{\def\expandafter\noexpand\csname _#1_#2\endcsname}%
  690.     \next{\mathrel{#3}}}
  691.  
  692. \gdef\newunop#1#2#3{%
  693.     \edef\next{\def\expandafter\noexpand\csname _#1_#2\endcsname}%
  694.     \next{\mathbin{#3}}}
  695.  
  696. \gdef\Wop#1#2{\setbox\dotbox\hbox{\tt .#1.}%
  697.     \edef\nxt{\expandafter\noexpand\csname _#1_#2\endcsname}%
  698.     \edef\ifnxt{\noexpand\ifx\expandafter\noexpand\csname _#1_#2\endcsname}%
  699.     \ifnxt\empty
  700.         \def\next{\box\dotbox}% Macro not defined; just use \.{.NAME.}.
  701.     \else
  702.         \def\next{\futurelet\nextchar\Woq}% Be careful about |\EE|.
  703.     \fi
  704.     \next}%
  705. }
  706.  
  707. \global\let\Wb\Wop
  708. \global\let\Wu\Wop
  709.  
  710. \let\Lbrace{
  711.  
  712. \def\Woq{\ifx\nextchar\Lbrace
  713.         \let\next\nxt % There's an argument coming up.
  714.     \else
  715.         \ifop
  716.             \def\next{\nxt{}\equiv\box\dotbox}%
  717.         \else
  718.             \let\next\nxt
  719.         \fi
  720.     \fi
  721.     \opfalse
  722.     \next}
  723.  
  724.  
  725. \newtoks\WARRAYarga
  726. \newtoks\WARRAYargb
  727.  
  728. \def\WXA#1{\begingroup
  729. %% We don't want the identifiers to be in hboxes, because we want to get
  730. %% |\scriptstyle| for subscripts.  (We should always be in math mode here.)
  731.     \def\Wshort##1{##1}%
  732.     \def\Wid##1{{\it ##1\/\kern.05em}}%
  733.     \global\WARRAYarga{#1}%
  734.     \futurelet\Wnext\WARRAYm}
  735.  
  736. \def\WARRAYm{\ifx\Wnext\WXA
  737.         \global\let\Wnext\WARRAYn% Multiple indices in C:  a[i][j][k]
  738.     \else
  739.         \global\let\Wnext\relax
  740.         \WARRAY{\the\WARRAYarga}% Typeset the accumulated indices.
  741.     \fi
  742.     \endgroup
  743.     \Wnext}
  744.  
  745. \def\WARRAYn#1#2{\WARRAYargb{#2}%
  746.     \edef\Wnext{\noexpand\WXA{\the\WARRAYarga,\the\WARRAYargb}}%Concatenate
  747.     \Wnext}
  748.  
  749. %% Change the following definition to get indices printed in interesting ways.
  750. \def\WARRAY#1{[#1]}% Default definition.
  751. \def\WSUB#1{_{\scriptstyle#1}}% E.g., subscript indices.
  752.  
  753.  
  754. \def\Wouto#1#2{\Wreserved{@#1}\Hspace\Wtypewriter{#2}}
  755. \def\Wout#1{\Wouto{o}{#1}}
  756. \def\WOut#1{\Wouto{O}{#1}}
  757.  
  758.  
  759. \newif\ifon
  760. \def\onmaybe{\let\ifon=\maybe} \let\maybe=\iftrue
  761.  
  762.  
  763. \newif\iftitle \newif\ifpagesaved
  764.  
  765. \newcount\contentspageno
  766.  
  767.  
  768. \def\lheader{\mainfont\the\pageno\eightrm\qquad\Whead\hfill\Wtitle\qquad
  769.     \ifnum\pageno=\contentspageno\else
  770.         \tensy x\mainfont\Wmodno
  771.     \fi}
  772.  
  773.  
  774. \def\rheader{\ifnum\pageno=\contentspageno\else
  775.         \tensy x\mainfont\Wmodno
  776.     \fi
  777.     \eightrm\qquad\Wtitle\hfill\Whead
  778.     \qquad\mainfont\the\pageno}
  779.  
  780.  
  781. \def\pagewidtho{6.5}% The width of each page
  782. \def\pageheighto{8.7}% The height of each page
  783. \def\fullpageheighto{9}% Page height including headlines
  784.  
  785. \newdimen\pagewidth \pagewidth\pagewidtho in
  786. \newdimen\pageheight \pageheight\pageheighto in
  787. \newdimen\fullpageheight \fullpageheight\fullpageheighto in
  788.  
  789. \newdimen\pageshift \pageshift=0in% Shift righthand pages wrt lefthand ones
  790.  
  791. \def\magnify#1{\mag=#1
  792.     \pagewidth\pagewidtho truein
  793.     \pageheight\pageheighto truein
  794.     \fullpageheight\fullpageheighto truein
  795.     \setpage}
  796.  
  797. \def\setpage{\hsize\pagewidth \vsize\pageheight}% Use after changing page size.
  798.  
  799.  
  800. \def\page{\box255 }
  801.  
  802. \newif\ifidenticalpageheads
  803.  
  804. \def\normaloutput#1#2#3{
  805.     \ifodd\pageno\hoffset=\pageshift\fi
  806.     \shipout\vbox
  807.         {
  808.         \vbox to\fullpageheight
  809.             {
  810.             \iftitle\global\titlefalse
  811.             \else \hbox to\pagewidth
  812.                 {\vbox to10pt{}%
  813.                 \ifidenticalpageheads#2\else
  814.                 \ifodd\pageno
  815.                     #3% Pg nos alternate left \& right.
  816.                 \else#2\fi
  817.                 \fi
  818.                 }%    
  819.             \fi
  820.             \vfill#1% Parameter |#1| is the page itself.
  821.             }
  822.         }
  823.     \global\advance\pageno by1}
  824.  
  825. \def\Wname{{\tt FWEB} OUTPUT}% This section name is reset by starred sections.
  826.  
  827. %% An OPTIONAL TITLE can be defined by the user in his limbo section.
  828. \def\Wtitle{}
  829.  
  830.  
  831. \newtoks\Woutput
  832. \Woutput\output% Remember FWEB's definition.
  833.  
  834.  
  835. \newcount\minutes
  836. \newcount\hours
  837.  
  838. \hours=\time
  839. \divide\hours by 60
  840. \multiply\hours by 60
  841. \minutes=\time
  842. \advance\minutes by -\hours
  843. \divide\hours by 60
  844.  
  845. \def\Time{\the\hours:\ifnum\minutes<10 0\fi\the\minutes}
  846.  
  847. \def\Date{\ifcase\month\or
  848.     January\or February\or March\or April\or May\or June\or
  849.     July\or August\or September\or October\or November\or December\fi
  850.     \space\number\day, \number\year}
  851.  
  852.  
  853. \def\topofcontents{\centerline{\titlefont\Wtitle}
  854.   \vfill} % This is the default.
  855.  
  856.  
  857.  
  858. \def\botofcontents{\vfill
  859.     \rightline{\Date}
  860.     \rightline{\Time}}
  861.  
  862. \contentspageno=0% Default page number for table of contents
  863.  
  864.  
  865. \newwrite\cont % For the table of contents.
  866.  
  867. \def\Wbegin[#1]#2#3#4#5#6{\edef\contentsfile{#5}%
  868.     \def\readcontents{\input\contentsfile}%
  869.     \Wequate#6
  870.     \ifLaTeXisloaded
  871.         \documentstyle[#1]{#2}%
  872.         \textwidth\pagewidth
  873.         \textheight\pageheight
  874.         \TeXindent#3
  875.         \begin{document}
  876.         \pageno=2
  877.     \else
  878.         \TeXindent#3
  879.     \fi
  880.     \notch#4
  881.     \output
  882.         {\setbox0=\page% The first page is garbage
  883.         \immediate\openout\cont=\contentsfile
  884.         \global\output{\normaloutput\page\lheader\rheader}%
  885.         }%
  886. %% Here we print out a garbage page, so that the first |\topmark| won't be
  887. % null.
  888.     \setpage
  889.     \vbox to \vsize{}
  890.     }
  891.  
  892.  
  893. \def\Wch{\note{The following sections were changed by the change file:}
  894.     \let\*=\relax}
  895.  
  896.  
  897. \newbox\Sbox % Saved box preceding the index
  898. \newbox\Lbox % Lefthand column in the index
  899.  
  900. %% The following macro is the style file entry \.{index.preamble}.
  901. \def\Winx{\par\vskip6pt plus 1fil
  902.     \write\cont{}% Ensure that the contents file isn't empty
  903.     \closeout\cont % The contents information has been fully gathered
  904.     \output{\ifpagesaved\normaloutput{\box\Sbox}\lheader\rheader\fi
  905.         \global\setbox\Sbox=\page \global\pagesavedtrue}
  906.     \pagesavedfalse \eject % Eject the page-so-far and predecessors
  907.     \setbox\Sbox\vbox{\unvbox\Sbox}% Take it out of its box
  908.     \vsize=\pageheight \advance\vsize by -\ht\Sbox % The remaining height
  909.     \hsize=.5\pagewidth \advance\hsize by -10pt
  910.         % Column width for the index (20pt between cols)
  911.     \parfillskip 0pt plus .6\hsize % Try to avoid almost empty lines
  912.     \def\lr{L}% This tells whether the left or right column is next
  913.     \output{\if L\lr\global\setbox\Lbox=\page \gdef\lr{R}
  914.         \else\normaloutput{\vbox to\pageheight{\box\Sbox\vss
  915.         \hbox to\pagewidth{\box\Lbox\hfil\page}}}\lheader\rheader
  916.         \global\vsize\pageheight\gdef\lr{L}\global\pagesavedfalse\fi}
  917. %%  \message{Index:}
  918.     \parskip 0pt plus .5pt
  919.     \outer\def\:##1, {\par\hangindent2em\noindent##1:\kern1em}% Index entry
  920.     \def\[##1]{$\underline{##1}$}% Underlined index item
  921.     \def\(##1){$^{\rm ##1}$}% Language marker
  922.     \let\Windexspace\medskip % Spacing between letter groups in index.
  923.     \rm \rightskip0pt plus 2.5em \tolerance 10000 \let\*=\lapstar
  924.     \hyphenpenalty 10000 \parindent0pt}
  925.  
  926.  
  927. \def\Wfin{\par\vfill\eject
  928.     \ifpagesaved\null\vfill\eject\fi % Output a null index column
  929.     \if L\lr\else\null\vfill\eject\fi % Finish the current page
  930.     \parfillskip 0pt plus 1fil
  931.     \def\rhead{NAMES OF THE SECTIONS}
  932.     \output{\normaloutput\page\lheader\rheader}
  933.     \setpage
  934.     \def\note##1##2.{\quad{\eightrm##1 ##2.}}
  935.     \def\WU{\note{Used in}}% Cross-reference for uses of sections
  936.     \def\:{\par\hangindent 2em}\let\*=*}
  937.  
  938.  
  939. \let\Wmods\relax
  940.  
  941.  
  942. \def\Winfo#1#2#3#4{\bigskip
  943.     \:{{\bf COMMAND LINE:}\ \ \Wtypewriter{#1}.}\smallskip
  944.     \:{{\bf WEB FILE:}\ \ \Wtypewriter{#2}.}\smallskip
  945.     \:{{\bf CHANGE FILE:}\ \ \Wtypewriter{#3}.}\medskip
  946.     \:{{\bf GLOBAL LANGUAGE:}\ \ \Wtypewriter{\rm #4}.}\medskip}
  947.  
  948.  
  949. \def\Wcon{\par\vfill\eject
  950.     \rightskip 0pt \hyphenpenalty 50 \tolerance 200
  951.     \setpage
  952.     \output{\normaloutput\page\lheader\rheader}
  953.     \titletrue % Prepare to output the table of contents
  954.     \pageno=\contentspageno \def\rhead{TABLE OF CONTENTS}
  955.     \topofcontents
  956.     \catcode`\@=11
  957.     \hbox to\hsize{\hfil Section\hbox to3em{\hss Page}}
  958.     \def\WZ##1##2##3##4{\hbox to\hsize{\kern##1em\ignorespaces##2
  959.         \leaders\hbox to .5em{.\hfil}\hfil\ ##3\hbox to3em{\hss##4}}}
  960.     \let\WIM\WIN % Restore the proper definition.
  961.     \readcontents\relax % Read the contents info.
  962.     \botofcontents
  963.     \FWEBend}
  964.  
  965.  
  966. %% Label a section with an identifying name.
  967. \def\modlabel#1{%
  968.     \ifLaTeXisloaded
  969.         \label{MOD#1}%
  970.     \else
  971.         \edef\next{\gdef\expandafter\noexpand\csname MOD#1\endcsname{\modno}}%
  972.         \next
  973.     \fi}
  974.  
  975. %% Print the number of a labelled section.
  976. \def\Wmodule#1{\ifLaTeXisloaded
  977.         \ref{MOD#1}%
  978.     \else
  979.         \csname MOD#1\endcsname
  980.     \fi}
  981.  
  982. %% Examples of references to sections.
  983. \def\WEBsection#1{section~\Wmodule{#1}}% |\section| is used by \LaTeX.
  984. \def\WEBmodule#1{module~\Wmodule{#1}}
  985. \let\module\WEBmodule% For backward compatibility.
  986.  
  987.  
  988. \def\strutdepth{\dp\strutbox}
  989.  
  990. \def\marginal#1{\strut\vadjust{\kern-\strutdepth\specialmargin{#1}}}
  991.  
  992. \def\specialmargin#1{\vtop to\strutdepth{
  993.     \baselineskip\strutdepth
  994.     \vss\llap{#1 }\null}}
  995.  
  996. \def\LANGUAGE#1{\marginal{\smash{\vtop{\hbox{%
  997.     \hbox{\tt@L\lowercase{#1}:\enspace}}\null}}}\ignorespaces}
  998.  
  999. %% Use the next one if you don't want language changes to be printed.
  1000.  
  1001.  
  1002. \newskip\ttglue
  1003.  
  1004. \ttglue=0.5em plus 0.25em minus 0.15em
  1005.  
  1006. \def\ttother{\catcode`\\=\other \catcode`\{=\other \catcode`\}=\other
  1007.     \catcode`\$=\other \catcode`\&=\other \catcode`\#=\other
  1008.     \catcode`\%=\other \catcode`\~=\other \catcode`\_=\other
  1009.     \catcode`\^=\other}
  1010.  
  1011. \def\ttverbatim{\begingroup \ttother \obeyspaces \obeylines \tt}
  1012.  
  1013. {\obeyspaces\gdef {\ }}
  1014.  
  1015. \def\begintt{$$\let\par=\endgraf
  1016.     \ttverbatim
  1017.     \parskip=0pt
  1018. %%    \catcode`\@=0
  1019.     \rightskip=-\parindent
  1020.     \ttfinish}
  1021.  
  1022. \def\Begintt{\bgroup
  1023.     \let\par=\endgraf
  1024.     \ttverbatim
  1025.     \parskip=0pt
  1026.     \rightskip=-\parindent
  1027.     \ttFinish}
  1028.  
  1029. {\catcode`\|=0
  1030.     |catcode`|\=\other
  1031.     |obeylines%
  1032.     |gdef|ttfinish#1^^M#2\endtt{#1|vbox{#2}|endgroup$$}%
  1033.     |gdef|ttFinish#1\Endtt{#1|endgroup|egroup}}
  1034.  
  1035. \let\verticalbar|
  1036.  
  1037. \def\activebar{\catcode`\|=\active}
  1038.  
  1039. {\activebar
  1040. \gdef\normalbar{\activebar
  1041.     \let|\verticalbar}}
  1042.  
  1043. %%\activebar
  1044.  
  1045. {\obeylines%
  1046. \gdef\ttbar{\activebar%
  1047.     {\obeylines\gdef|{\ttverbatim%
  1048.         \spaceskip=\ttglue%
  1049.         \let^^M=\ \let|=\endgroup}}}}
  1050.  
  1051. \let\WCX\Begintt
  1052.  
  1053.  
  1054.